3.60 \(\int (c+d \tan (e+f x))^2 (A+B \tan (e+f x)+C \tan ^2(e+f x)) \, dx\)

Optimal. Leaf size=131 \[ -\frac{\left (2 c d (A-C)+B \left (c^2-d^2\right )\right ) \log (\cos (e+f x))}{f}-x \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )+\frac{d \tan (e+f x) (d (A-C)+B c)}{f}+\frac{B (c+d \tan (e+f x))^2}{2 f}+\frac{C (c+d \tan (e+f x))^3}{3 d f} \]

[Out]

-((c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2))*x) - ((2*c*(A - C)*d + B*(c^2 - d^2))*Log[Cos[e + f*x]])/f + (d*(B
*c + (A - C)*d)*Tan[e + f*x])/f + (B*(c + d*Tan[e + f*x])^2)/(2*f) + (C*(c + d*Tan[e + f*x])^3)/(3*d*f)

________________________________________________________________________________________

Rubi [A]  time = 0.155012, antiderivative size = 131, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.121, Rules used = {3630, 3528, 3525, 3475} \[ -\frac{\left (2 c d (A-C)+B \left (c^2-d^2\right )\right ) \log (\cos (e+f x))}{f}-x \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )+\frac{d \tan (e+f x) (d (A-C)+B c)}{f}+\frac{B (c+d \tan (e+f x))^2}{2 f}+\frac{C (c+d \tan (e+f x))^3}{3 d f} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*Tan[e + f*x])^2*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2),x]

[Out]

-((c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2))*x) - ((2*c*(A - C)*d + B*(c^2 - d^2))*Log[Cos[e + f*x]])/f + (d*(B
*c + (A - C)*d)*Tan[e + f*x])/f + (B*(c + d*Tan[e + f*x])^2)/(2*f) + (C*(c + d*Tan[e + f*x])^3)/(3*d*f)

Rule 3630

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> Simp[(C*(a + b*Tan[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Int[(a + b*Tan[e + f*x])
^m*Simp[A - C + B*Tan[e + f*x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && NeQ[A*b^2 - a*b*B + a^2*C, 0]
&&  !LeQ[m, -1]

Rule 3528

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(d
*(a + b*Tan[e + f*x])^m)/(f*m), x] + Int[(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x
], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]

Rule 3525

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(a*c - b
*d)*x, x] + (Dist[b*c + a*d, Int[Tan[e + f*x], x], x] + Simp[(b*d*Tan[e + f*x])/f, x]) /; FreeQ[{a, b, c, d, e
, f}, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (c+d \tan (e+f x))^2 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right ) \, dx &=\frac{C (c+d \tan (e+f x))^3}{3 d f}+\int (A-C+B \tan (e+f x)) (c+d \tan (e+f x))^2 \, dx\\ &=\frac{B (c+d \tan (e+f x))^2}{2 f}+\frac{C (c+d \tan (e+f x))^3}{3 d f}+\int (c+d \tan (e+f x)) (A c-c C-B d+(B c+(A-C) d) \tan (e+f x)) \, dx\\ &=-\left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right ) x+\frac{d (B c+(A-C) d) \tan (e+f x)}{f}+\frac{B (c+d \tan (e+f x))^2}{2 f}+\frac{C (c+d \tan (e+f x))^3}{3 d f}+\left (2 c (A-C) d+B \left (c^2-d^2\right )\right ) \int \tan (e+f x) \, dx\\ &=-\left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right ) x-\frac{\left (2 c (A-C) d+B \left (c^2-d^2\right )\right ) \log (\cos (e+f x))}{f}+\frac{d (B c+(A-C) d) \tan (e+f x)}{f}+\frac{B (c+d \tan (e+f x))^2}{2 f}+\frac{C (c+d \tan (e+f x))^3}{3 d f}\\ \end{align*}

Mathematica [C]  time = 1.12575, size = 176, normalized size = 1.34 \[ \frac{3 (d (C-A)+B c) \left (-2 d^2 \tan (e+f x)+i \left ((c+i d)^2 \log (-\tan (e+f x)+i)-(c-i d)^2 \log (\tan (e+f x)+i)\right )\right )+3 B \left (6 c d^2 \tan (e+f x)+(-d+i c)^3 \log (-\tan (e+f x)+i)-(d+i c)^3 \log (\tan (e+f x)+i)+d^3 \tan ^2(e+f x)\right )+2 C (c+d \tan (e+f x))^3}{6 d f} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*Tan[e + f*x])^2*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2),x]

[Out]

(2*C*(c + d*Tan[e + f*x])^3 + 3*(B*c + (-A + C)*d)*(I*((c + I*d)^2*Log[I - Tan[e + f*x]] - (c - I*d)^2*Log[I +
 Tan[e + f*x]]) - 2*d^2*Tan[e + f*x]) + 3*B*((I*c - d)^3*Log[I - Tan[e + f*x]] - (I*c + d)^3*Log[I + Tan[e + f
*x]] + 6*c*d^2*Tan[e + f*x] + d^3*Tan[e + f*x]^2))/(6*d*f)

________________________________________________________________________________________

Maple [B]  time = 0.015, size = 262, normalized size = 2. \begin{align*}{\frac{C{d}^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{3\,f}}+{\frac{B \left ( \tan \left ( fx+e \right ) \right ) ^{2}{d}^{2}}{2\,f}}+{\frac{C \left ( \tan \left ( fx+e \right ) \right ) ^{2}cd}{f}}+{\frac{A{d}^{2}\tan \left ( fx+e \right ) }{f}}+2\,{\frac{Bcd\tan \left ( fx+e \right ) }{f}}+{\frac{{c}^{2}C\tan \left ( fx+e \right ) }{f}}-{\frac{C{d}^{2}\tan \left ( fx+e \right ) }{f}}+{\frac{\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) Acd}{f}}+{\frac{\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) B{c}^{2}}{2\,f}}-{\frac{\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) B{d}^{2}}{2\,f}}-{\frac{\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) cCd}{f}}+{\frac{A\arctan \left ( \tan \left ( fx+e \right ) \right ){c}^{2}}{f}}-{\frac{A\arctan \left ( \tan \left ( fx+e \right ) \right ){d}^{2}}{f}}-2\,{\frac{B\arctan \left ( \tan \left ( fx+e \right ) \right ) cd}{f}}-{\frac{C\arctan \left ( \tan \left ( fx+e \right ) \right ){c}^{2}}{f}}+{\frac{C\arctan \left ( \tan \left ( fx+e \right ) \right ){d}^{2}}{f}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c+d*tan(f*x+e))^2*(A+B*tan(f*x+e)+C*tan(f*x+e)^2),x)

[Out]

1/3/f*C*d^2*tan(f*x+e)^3+1/2/f*B*tan(f*x+e)^2*d^2+1/f*C*tan(f*x+e)^2*c*d+1/f*A*d^2*tan(f*x+e)+2/f*B*c*d*tan(f*
x+e)+1/f*c^2*C*tan(f*x+e)-1/f*C*d^2*tan(f*x+e)+1/f*ln(1+tan(f*x+e)^2)*A*c*d+1/2/f*ln(1+tan(f*x+e)^2)*B*c^2-1/2
/f*ln(1+tan(f*x+e)^2)*B*d^2-1/f*ln(1+tan(f*x+e)^2)*c*C*d+1/f*A*arctan(tan(f*x+e))*c^2-1/f*A*arctan(tan(f*x+e))
*d^2-2/f*B*arctan(tan(f*x+e))*c*d-1/f*C*arctan(tan(f*x+e))*c^2+1/f*C*arctan(tan(f*x+e))*d^2

________________________________________________________________________________________

Maxima [A]  time = 1.44305, size = 182, normalized size = 1.39 \begin{align*} \frac{2 \, C d^{2} \tan \left (f x + e\right )^{3} + 3 \,{\left (2 \, C c d + B d^{2}\right )} \tan \left (f x + e\right )^{2} + 6 \,{\left ({\left (A - C\right )} c^{2} - 2 \, B c d -{\left (A - C\right )} d^{2}\right )}{\left (f x + e\right )} + 3 \,{\left (B c^{2} + 2 \,{\left (A - C\right )} c d - B d^{2}\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right ) + 6 \,{\left (C c^{2} + 2 \, B c d +{\left (A - C\right )} d^{2}\right )} \tan \left (f x + e\right )}{6 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))^2*(A+B*tan(f*x+e)+C*tan(f*x+e)^2),x, algorithm="maxima")

[Out]

1/6*(2*C*d^2*tan(f*x + e)^3 + 3*(2*C*c*d + B*d^2)*tan(f*x + e)^2 + 6*((A - C)*c^2 - 2*B*c*d - (A - C)*d^2)*(f*
x + e) + 3*(B*c^2 + 2*(A - C)*c*d - B*d^2)*log(tan(f*x + e)^2 + 1) + 6*(C*c^2 + 2*B*c*d + (A - C)*d^2)*tan(f*x
 + e))/f

________________________________________________________________________________________

Fricas [A]  time = 1.0522, size = 308, normalized size = 2.35 \begin{align*} \frac{2 \, C d^{2} \tan \left (f x + e\right )^{3} + 6 \,{\left ({\left (A - C\right )} c^{2} - 2 \, B c d -{\left (A - C\right )} d^{2}\right )} f x + 3 \,{\left (2 \, C c d + B d^{2}\right )} \tan \left (f x + e\right )^{2} - 3 \,{\left (B c^{2} + 2 \,{\left (A - C\right )} c d - B d^{2}\right )} \log \left (\frac{1}{\tan \left (f x + e\right )^{2} + 1}\right ) + 6 \,{\left (C c^{2} + 2 \, B c d +{\left (A - C\right )} d^{2}\right )} \tan \left (f x + e\right )}{6 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))^2*(A+B*tan(f*x+e)+C*tan(f*x+e)^2),x, algorithm="fricas")

[Out]

1/6*(2*C*d^2*tan(f*x + e)^3 + 6*((A - C)*c^2 - 2*B*c*d - (A - C)*d^2)*f*x + 3*(2*C*c*d + B*d^2)*tan(f*x + e)^2
 - 3*(B*c^2 + 2*(A - C)*c*d - B*d^2)*log(1/(tan(f*x + e)^2 + 1)) + 6*(C*c^2 + 2*B*c*d + (A - C)*d^2)*tan(f*x +
 e))/f

________________________________________________________________________________________

Sympy [A]  time = 1.33194, size = 241, normalized size = 1.84 \begin{align*} \begin{cases} A c^{2} x + \frac{A c d \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{f} - A d^{2} x + \frac{A d^{2} \tan{\left (e + f x \right )}}{f} + \frac{B c^{2} \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} - 2 B c d x + \frac{2 B c d \tan{\left (e + f x \right )}}{f} - \frac{B d^{2} \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac{B d^{2} \tan ^{2}{\left (e + f x \right )}}{2 f} - C c^{2} x + \frac{C c^{2} \tan{\left (e + f x \right )}}{f} - \frac{C c d \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{f} + \frac{C c d \tan ^{2}{\left (e + f x \right )}}{f} + C d^{2} x + \frac{C d^{2} \tan ^{3}{\left (e + f x \right )}}{3 f} - \frac{C d^{2} \tan{\left (e + f x \right )}}{f} & \text{for}\: f \neq 0 \\x \left (c + d \tan{\left (e \right )}\right )^{2} \left (A + B \tan{\left (e \right )} + C \tan ^{2}{\left (e \right )}\right ) & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))**2*(A+B*tan(f*x+e)+C*tan(f*x+e)**2),x)

[Out]

Piecewise((A*c**2*x + A*c*d*log(tan(e + f*x)**2 + 1)/f - A*d**2*x + A*d**2*tan(e + f*x)/f + B*c**2*log(tan(e +
 f*x)**2 + 1)/(2*f) - 2*B*c*d*x + 2*B*c*d*tan(e + f*x)/f - B*d**2*log(tan(e + f*x)**2 + 1)/(2*f) + B*d**2*tan(
e + f*x)**2/(2*f) - C*c**2*x + C*c**2*tan(e + f*x)/f - C*c*d*log(tan(e + f*x)**2 + 1)/f + C*c*d*tan(e + f*x)**
2/f + C*d**2*x + C*d**2*tan(e + f*x)**3/(3*f) - C*d**2*tan(e + f*x)/f, Ne(f, 0)), (x*(c + d*tan(e))**2*(A + B*
tan(e) + C*tan(e)**2), True))

________________________________________________________________________________________

Giac [B]  time = 3.58531, size = 2873, normalized size = 21.93 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))^2*(A+B*tan(f*x+e)+C*tan(f*x+e)^2),x, algorithm="giac")

[Out]

1/6*(6*A*c^2*f*x*tan(f*x)^3*tan(e)^3 - 6*C*c^2*f*x*tan(f*x)^3*tan(e)^3 - 12*B*c*d*f*x*tan(f*x)^3*tan(e)^3 - 6*
A*d^2*f*x*tan(f*x)^3*tan(e)^3 + 6*C*d^2*f*x*tan(f*x)^3*tan(e)^3 - 3*B*c^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan
(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 -
 6*A*c*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 -
2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 + 6*C*c*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3
*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 + 3*B*d^2*log(4*(tan(
e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) +
1))*tan(f*x)^3*tan(e)^3 - 18*A*c^2*f*x*tan(f*x)^2*tan(e)^2 + 18*C*c^2*f*x*tan(f*x)^2*tan(e)^2 + 36*B*c*d*f*x*t
an(f*x)^2*tan(e)^2 + 18*A*d^2*f*x*tan(f*x)^2*tan(e)^2 - 18*C*d^2*f*x*tan(f*x)^2*tan(e)^2 + 6*C*c*d*tan(f*x)^3*
tan(e)^3 + 3*B*d^2*tan(f*x)^3*tan(e)^3 + 9*B*c^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(
e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 + 18*A*c*d*log(4*(tan(e)^2
 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*
tan(f*x)^2*tan(e)^2 - 18*C*c*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*ta
n(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 - 9*B*d^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*t
an(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2
 - 6*C*c^2*tan(f*x)^3*tan(e)^2 - 12*B*c*d*tan(f*x)^3*tan(e)^2 - 6*A*d^2*tan(f*x)^3*tan(e)^2 + 6*C*d^2*tan(f*x)
^3*tan(e)^2 - 6*C*c^2*tan(f*x)^2*tan(e)^3 - 12*B*c*d*tan(f*x)^2*tan(e)^3 - 6*A*d^2*tan(f*x)^2*tan(e)^3 + 6*C*d
^2*tan(f*x)^2*tan(e)^3 + 18*A*c^2*f*x*tan(f*x)*tan(e) - 18*C*c^2*f*x*tan(f*x)*tan(e) - 36*B*c*d*f*x*tan(f*x)*t
an(e) - 18*A*d^2*f*x*tan(f*x)*tan(e) + 18*C*d^2*f*x*tan(f*x)*tan(e) + 6*C*c*d*tan(f*x)^3*tan(e) + 3*B*d^2*tan(
f*x)^3*tan(e) - 6*C*c*d*tan(f*x)^2*tan(e)^2 - 3*B*d^2*tan(f*x)^2*tan(e)^2 + 6*C*c*d*tan(f*x)*tan(e)^3 + 3*B*d^
2*tan(f*x)*tan(e)^3 - 2*C*d^2*tan(f*x)^3 - 9*B*c^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*ta
n(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) - 18*A*c*d*log(4*(tan(e)^2 +
 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*ta
n(f*x)*tan(e) + 18*C*c*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2
 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) + 9*B*d^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 -
2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) + 12*C*c^2*ta
n(f*x)^2*tan(e) + 24*B*c*d*tan(f*x)^2*tan(e) + 12*A*d^2*tan(f*x)^2*tan(e) - 18*C*d^2*tan(f*x)^2*tan(e) + 12*C*
c^2*tan(f*x)*tan(e)^2 + 24*B*c*d*tan(f*x)*tan(e)^2 + 12*A*d^2*tan(f*x)*tan(e)^2 - 18*C*d^2*tan(f*x)*tan(e)^2 -
 2*C*d^2*tan(e)^3 - 6*A*c^2*f*x + 6*C*c^2*f*x + 12*B*c*d*f*x + 6*A*d^2*f*x - 6*C*d^2*f*x - 6*C*c*d*tan(f*x)^2
- 3*B*d^2*tan(f*x)^2 + 6*C*c*d*tan(f*x)*tan(e) + 3*B*d^2*tan(f*x)*tan(e) - 6*C*c*d*tan(e)^2 - 3*B*d^2*tan(e)^2
 + 3*B*c^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2
- 2*tan(f*x)*tan(e) + 1)) + 6*A*c*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)
^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) - 6*C*c*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan
(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) - 3*B*d^2*log(4*(tan(e)^2 + 1)/(ta
n(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) - 6*C*c^2
*tan(f*x) - 12*B*c*d*tan(f*x) - 6*A*d^2*tan(f*x) + 6*C*d^2*tan(f*x) - 6*C*c^2*tan(e) - 12*B*c*d*tan(e) - 6*A*d
^2*tan(e) + 6*C*d^2*tan(e) - 6*C*c*d - 3*B*d^2)/(f*tan(f*x)^3*tan(e)^3 - 3*f*tan(f*x)^2*tan(e)^2 + 3*f*tan(f*x
)*tan(e) - f)